package com.school.controller;

import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.school.service.impl.HljtWebHomeServiceImpl;
import com.school.util.RepUtil;

@Controller
@RequestMapping(value="homeConTroller")
public class HljtWebHomeController {
 
	@Autowired
	HljtWebHomeServiceImpl oService;
	
//	@RequestMapping(value="/findDeviceCount")
//	@ResponseBody
//	public int findDeviceCount(HttpServletResponse rep){
//		RepUtil.repPake(rep);
//		return oService.findDeviceCount();
//	};
	/**
	 * 查找设备信息
	 * @param pageIndex
	 * @param pageSize
	 * @param rep
	 * @return
	 */
	@RequestMapping(value="/findDeviceInfo")
	@ResponseBody
	public String findDeviceInfo(int pageIndex,int pageSize,HttpServletResponse rep){
		RepUtil.repPake(rep);
		return oService.findDeviceInfo(pageIndex, pageSize);
	}
	/**
	 * 学校人设 详情
	 * @param rep
	 * @return
	 */
	@RequestMapping(value="/findNumberInfo")
	@ResponseBody
	public String findNumberInfo(HttpServletResponse rep){
		RepUtil.repPake(rep);
		return oService.findSchoolNumberCount();
	}
}
